import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from 'unplugin-vue-components/resolvers';
import path from 'path'

// 别名配置
function _resolve(dir) {
  return path.resolve(__dirname, dir)
}





// https://vitejs.dev/config/
export default defineConfig({
  externals: {
'AMap':'AMap',

'AMapUI': 'AMapUI'

},
  plugins: [
    vue(),
    Components({
      resolvers: [VantResolver()],
    })
  ],
  resolve: {
    alias: {
      '@': _resolve('src'),
    },
  }

})
